﻿using System;
using Zongsoft.Data;

namespace Dxr.Police.Models
{
    public class UserInfoConditional : Conditional
    {
        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Equal)]
        public string Id
        {
            get { return this.GetPropertyValue(() => this.Id); }
            set { this.SetPropertyValue(() => this.Id, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Like)]
        public string Name
        {
            get { return this.GetPropertyValue(() => this.Name); }
            set { this.SetPropertyValue(() => this.Name, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Equal)]
        public string CountyId
        {
            get { return this.GetPropertyValue(() => this.CountyId); }
            set { this.SetPropertyValue(() => this.CountyId, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Equal)]
        public string DepartmentId
        {
            get { return this.GetPropertyValue(() => this.DepartmentId); }
            set { this.SetPropertyValue(() => this.DepartmentId, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Equal)]
        public string WorkPlaceId
        {
            get { return this.GetPropertyValue(() => this.WorkPlaceId); }
            set { this.SetPropertyValue(() => this.WorkPlaceId, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Equal)]
        public RoleType? Role
        {
            get { return this.GetPropertyValue(() => this.Role); }
            set { this.SetPropertyValue(() => this.Role, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Like)]
        public string IdCardNo
        {
            get { return this.GetPropertyValue(() => this.IdCardNo); }
            set { this.SetPropertyValue(() => this.IdCardNo, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Like)]
        public string PoliceNo
        {
            get { return this.GetPropertyValue(() => this.PoliceNo); }
            set { this.SetPropertyValue(() => this.PoliceNo, value); }
        }

        [Conditional(behaviors: ConditionalBehaviors.IgnoreNullOrEmpty, @operator: ConditionOperator.Like)]
        public string Tel
        {
            get { return this.GetPropertyValue(() => this.Tel); }
            set { this.SetPropertyValue(() => this.Tel, value); }
        }
    }
}
